import request from '@/utils/request'

export async function useCasePageQuery(useCase, paginator) {
  return await request({
    url: '/bicAdmin/useCase/query',
    method: 'post',
    data: {
      'useCase': useCase,
      'paginator': paginator
    }
  })
}

export async function useCaseSave(useCase) {
  return await request({
    url: '/bicAdmin/useCase/save',
    method: 'post',
    data: useCase
  })
}

export async function remoteValidateUseCaseName(systemUuid, name) {
  return await request({
    url: '/bicAdmin/useCase/validateName/' + systemUuid + '/' + name,
    method: 'get',
  })
}

export async function remoteValidatesUseCaseKey(systemUuid, key) {
  return await request({
    url: '/bicAdmin/useCase/validateKey/' + systemUuid + '/' + key,
    method: 'get',
  })
}
